package com.example.zqh.service;

import com.example.zqh.model.RespBean;
import com.example.zqh.pojo.Food;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.zqh.pojo.params.FoodParams;
import com.example.zqh.pojo.params.OneStringOneNumber;
import com.example.zqh.pojo.params.TwoInt;

import java.io.IOException;
import java.security.Principal;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zqh
 * @since 2022-09-10
 */
public interface FoodService extends IService<Food> {

    /**
      * @Author: zqh
      * @Date:
      * @Description: 店铺添加新菜品
    */
    RespBean addNewDishesToTheStore(FoodParams foodParams, Principal principal)throws IOException;
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 下架菜品
    */
    RespBean disher(Integer id)throws IOException;
    
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 修改菜品名
    */
    RespBean modifyTheDishName(OneStringOneNumber oneStringOneNumber)throws IOException;
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 修改菜品原料
    */
    RespBean modifyTheIngredientsOfDishes(OneStringOneNumber oneStringOneNumber)throws IOException;
    
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 修改菜品的价格
    */
    RespBean modifyThePriceOfADish(TwoInt twoInt)throws IOException;
    
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 修改菜品描述
    */
    RespBean modifyTheDescriptionOfTheDish(OneStringOneNumber oneStringOneNumber)throws IOException;
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 修改菜品吃了以后的好处
    */
    RespBean theBenefitsOfModifyingTheDishesAfterEating(OneStringOneNumber oneStringOneNumber)throws IOException;
    
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 修改菜品图片
    */
    RespBean modifyPicturesOfDishes(OneStringOneNumber oneStringOneNumber)throws IOException;
    
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 查询某个商店菜品的数量
    */
    RespBean getShopFoodNumberByShop_id(Integer shop_id);
    
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 分页查询菜品
    */
    RespBean getFoodsByPage(Integer shop_id, Integer page, Integer size)throws IOException;

    /**
      * @Author: zqh
      * @Date:
      * @Description: 通过菜品id查询某个菜品的信息
    */
    RespBean queryTheInformationOfADishByTheDishId(Integer id);


    /**
      * @Author: zqh
      * @Date:
      * @Description: 分页查询所有菜品
    */
    RespBean getAllFoodsByPaging(Integer page, Integer size)throws IOException;
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 获取所有菜品的数量
    */
    RespBean getTheQuantityOfAllDishes();
    
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 通过食物类型，分页查询食物
    */
    RespBean getFoodsByTypeAndPage(Integer typeId, Integer page, Integer size)throws IOException;
    
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 通过食物种类id，获取该种种类的数量
    */
    RespBean getNumberByType(Integer typeId);
    
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 设置某个菜品为热销菜品
    */
    RespBean setADishAsAPopularDish(Integer id)throws IOException;
    
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 把菜品设置为滞销菜品
    */
    RespBean setDishesAsSlowSellingDishes(Integer id)throws IOException;

    /**
      * @Author: zqh
      * @Date:
      * @Description: 创建food的es数据库
    */
    RespBean createFoodSEsDatabase()throws IOException;


    /**
      * @Author: zqh
      * @Date:
      * @Description: 删除food的es数据库
    */
    RespBean deletefoodEsDatabase()throws IOException;


    /**
      * @Author: zqh
      * @Date:
      * @Description: 判断Food的es数据库是否存在
    */
    RespBean GetIndex()throws IOException;


    /**
      * @Author: zqh
      * @Date:
      * @Description: song的所有数据库上传es里面
    */
    RespBean allDatabasesOfFoodAreUploadedInEs()throws IOException;


    /**
      * @Author: zqh
      * @Date:
      * @Description: 搜索引擎
    */
    RespBean searchEngine(String keyword)throws IOException;
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 通过名字查询多条
    */
    RespBean searchByName(String name)throws IOException;


    /**
      * @Author: zqh
      * @Date:
      * @Description: 管理员修改菜品信息接口
    */
    RespBean changeFoodByAdmin(Food food);
}
